﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Media.Imaging;

namespace ThePresenter
{
	internal static class Helpers
	{
		internal static BitmapImage ToBitmapImage(this MemoryStream ms)
		{
			BitmapImage bitmap = new BitmapImage();

			bitmap.BeginInit();
			bitmap.StreamSource = ms;
			bitmap.CreateOptions = BitmapCreateOptions.PreservePixelFormat;
			bitmap.EndInit();

			return bitmap;
		}
	}
}
